/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.valarnin.plugins.citygen;

import java.util.List;
import org.bukkit.World;
import org.bukkit.generator.BlockPopulator;
import org.bukkit.generator.ChunkGenerator;

/**
 *
 * @author valarnin
 */
class CityGenChunkGenerator extends ChunkGenerator {
    
    private static CityGenChunkGenerator instance = null;

    public static ChunkGenerator getInstance() {
        if(instance == null) {
            instance = new CityGenChunkGenerator();
        }
        return instance;
    }
    
    CityGenPopulator populator = new CityGenPopulator();

    @Override
    public List<BlockPopulator> getDefaultPopulators(World world) {
        List<BlockPopulator> defaultPopulators = super.getDefaultPopulators(world);
        
        defaultPopulators.add(populator);
        
        return defaultPopulators;
    }
    
}
